package com.cap.bts.crmdp.dealer.coupon.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.cap.bts.framework.common.domain.BaseDomain;


/**
 * The persistent class for the TM_RAW_COUPON_LINE database table.
 * 
 */
@Entity
@Table(name="TM_RAW_COUPON_LINE")
public class CouponBatchLine extends BaseDomain implements Serializable {
	private static final long serialVersionUID = 1L;

	private Long id;

	private CouponBatch couponBatch;

	private Ticket ticket;
	
	private Long num;
	
	private Long totalNum;

	public CouponBatchLine() {
	}

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

    @ManyToOne(optional = true, targetEntity = CouponBatch.class)
    @JoinColumn(name = "COUPON_BATCH_ID", referencedColumnName = "ID")
    public CouponBatch getCouponBatch() {
        return couponBatch;
    }

    public void setCouponBatch(CouponBatch couponBatch) {
        this.couponBatch = couponBatch;
    }

    @ManyToOne(optional = true, targetEntity = Ticket.class)
    @JoinColumn(name = "TICKET_DEF_ID", referencedColumnName = "ID")
    public Ticket getTicket() {
        return ticket;
    }

    public void setTicket(Ticket ticket) {
        this.ticket = ticket;
    }

    @Column(name = "NUM")
    public Long getNum() {
        return num;
    }

    public void setNum(Long num) {
        this.num = num;
    }

    @Column(name = "TOTAL_NUM")
    public Long getTotalNum() {
        return totalNum;
    }

    public void setTotalNum(Long totalNum) {
        this.totalNum = totalNum;
    }
    
    

}